package com.coco.enums;

import lombok.Getter;

@Getter
public enum JdbcTypeEnums {

    VARCHAR("VARCHAR","String"),
    CHAR("CHAR","String"),
    INTEGER("INT","Integer"),
    BIGINTEGER("BIGINT","Long"),
    DATE("DATE","Date"),
    DATETIME("DATETIME","Date"),
    TIMESTAMP("TIMESTAMP","Date"),
    TIME("TIME","Date"),
    TINYINT("TINYINT","Integer")
    ;
    private String k;
    private String v;

    JdbcTypeEnums(String k,String v) {
        this.k = k;
        this.v = v;
    }

    public static String getVal(String k) {
        JdbcTypeEnums[] values = JdbcTypeEnums.values();
        for (JdbcTypeEnums value : values) {
            if (value.getK().equals(k)) {
                return value.getV();
            }
        }
        return null;
    }
}
